import datetime
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from applications.extensions import db


class ConfrontationReport(db.Model):
    __tablename__ = 'confrontation_report'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='执法训练成绩id')
    user_id = db.Column(db.Integer, comment='训练警员id')
    result = db.Column(db.Integer, comment='训练是否成功，0为失败，1 为成功')
    total_time = db.Column(db.FLOAT, comment='训练时长')
    training_name = db.Column(db.String(255), comment='训练名称')
    score = db.Column(db.DECIMAL(2), comment='训练成绩')
    train_at = db.Column(db.DateTime,default=datetime.datetime.now, comment='训练时间')
